﻿<!DOCTYPE html>
<html>
<head>
	<title>首页</title>

	<link rel="stylesheet" type="text/css" href="${base}/css/wangEditor.css">
	<link rel="stylesheet" type="text/css" href="${base}/css/base.css">
	<link rel="stylesheet" type="text/css" href="${base}/css/nav.css">
	<link rel="stylesheet" type="text/css" href="${base}/css/mask.css">
	<link rel="stylesheet" type="text/css" href="${base}/css/index.css?aasd">
	
</head>
<body>
	<#include "nav.html"/>
	<div class="main">
		<div class="content">
			<div class="home-entry">
				<div class="home-entry-avatar">
					<img id="userAvatar" src="image/avatar2.jpg">
				</div>
				<div class="home-entry-box">
					<ul class="home-entry-list">
						<li><a href="#" class="open-mask"><i class="sprite-ask"></i>提问qq</a></li>
						<li><a href="${base}/questionList"><i class="sprite-answer"></i>回答</a></li>
					</ul>
				</div>
			</div>
			<div class="list-title">
				<div class="title-text"><span class="glyphicon glyphicon-list-alt"></span>&nbsp;&nbsp;最新动态</div>
				<div class="setting"><a href="setting"><span class="glyphicon glyphicon-cog"></span>&nbsp;设置</a></div>
			</div>
			<div id="feedList" class="feed-list">
				<script id="feedListTemplate" type="text/html">
				{{each answerList}}
				<div class="feed-item">
					<div class="avatar">
						<a href="${base}/profile/{{$value.user.userId}}"><img src="{{$value.user.avatarUrl}}"></a>
					</div>
					<div class="vote-count">
						<% if($value.likeState=="true"){ %>
							<a class="like-clicked">{{$value.likedCount}}</a>
						<% }else{ %>
							<a>{{$value.likedCount}}</a>
						<% } %>
					</div>
					<div class="feed-body">
						<div class="feed-source">
							<a href="${base}/profile/{{$value.user.userId}}">{{$value.user.username}}</a>
							<span>&nbsp;回答了问题</span>
							<span>&nbsp;•&nbsp;</span>
							<span>{{$value.createTime | $longToDateString}}</span>
						</div>
						<h2 class="feed-title">
							<a href="${base}/question/{{$value.question.questionId}}#answer-{{$value.answerId}}">{{$value.question.questionTitle}}</a>
						</h2>
						<div class="feed-user-info">
							<a href="#">{{$value.user.username}}</a>
							<span class="comma">，</span>
							<span>{{$value.user.simpleDesc}}</span>
						</div>
						<div class="feed-content">
							<%==$value.answerContent%>

						</div>
						<div class="feed-meta">
							<a href="${base}/question/{{$value.question.questionId}}#answer-{{$value.answerId}}"><span class="glyphicon glyphicon-plus"></span>&nbsp;关注问题</a>
							<a href="${base}/question/{{$value.question.questionId}}#answer-{{$value.answerId}}"><span class="glyphicon glyphicon-leaf"></span>{{$value.commentCount}}条评论</a>
							<div class="hidden-part" style="display: none;">
								<a href="${base}/question/{{$value.question.questionId}}#answer-{{$value.answerId}}"><span class="glyphicon glyphicon-bookmark"></span>&nbsp;收藏</a>
							</div>
							<a href="${base}/question/{{$value.question.questionId}}#answer-{{$value.answerId}}">作者保留权利</a>
						</div>
					</div>
				</div>
				{{/each}}
				</script>
			</div>
		</div>
		<div class="sidebar">
			<div class="sidebar-top">
				<ul>
					<li><a href="${base}/collections"><i class="sprite-collection"></i>我的收藏</a></li>
					<li><a class="profile-question-link" href=""><i class="sprite-invite"></i>我的提问</a></li>
					<li><a class="profile-link" href=""><i class="sprite-invite"></i>我回答的问题</a></li>
					<li><a class="profile-follow-question-link" href=""><i class="sprite-question"></i>我关注的问题</a></li>
				</ul>
			</div>

			<div class="footer">
				<a href="#">建议反馈</a>
				<span> • </span>
				<a href="#">联系我们</a>
				<div></div>
				<span>@ 2017 蛤乎</span>
			</div>
		</div>
	</div>
	<#include "mask.html"/>


<script type="text/javascript" src="${base}/js/wangEditor.js"></script>
<script type="text/javascript" src="${base}/js/template-web.js"></script>
<script type="text/javascript" src="${base}/js/nav.js"></script>
<script type="text/javascript" src="${base}/js/mask.js"></script>
<script type="text/javascript" src="${base}/js/index.js?sd"></script>
<script>

</script>
</body>
</html>

